/**
 * 
 */
package fantasy.jsf.beans;

import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import fantasy.jsf.model.LeagueTeam;

/**
 * @author npgm974
 *
 */
@ManagedBean
@RequestScoped
public class LeagueTeamBean 
{
	private List<LeagueTeam> leagueTeams = null;
	
	public LeagueTeamBean()
	{
		if(leagueTeams == null)
		{
			leagueTeams = new ArrayList<LeagueTeam>();
		
			LeagueTeam team1 = new LeagueTeam();
			team1.setTeamAbbr("RCB");
			team1.setTeamName("Royal Challengers Bangalore");
			leagueTeams.add(team1);
			
			team1 = new LeagueTeam();
			team1.setTeamAbbr("MI");
			team1.setTeamName("Mumbai Indians");
			leagueTeams.add(team1);
			
			team1 = new LeagueTeam();
			team1.setTeamAbbr("RR");
			team1.setTeamName("Rajasthan Royals");
			leagueTeams.add(team1);
			
			team1 = new LeagueTeam();
			team1.setTeamAbbr("CSK");
			team1.setTeamName("Chennai Super Kings");
			leagueTeams.add(team1);
			
			team1 = new LeagueTeam();
			team1.setTeamAbbr("KXIP");
			team1.setTeamName("Kings Eleven Punjab");
			leagueTeams.add(team1);
		}
	}

	public List<LeagueTeam> getLeagueTeams() {
		return leagueTeams;
	}

	public void setLeagueTeams(List<LeagueTeam> leagueTeams) {
		this.leagueTeams = leagueTeams;
	}
}
